package com.kingyun.gpsinspection.purificationservice.dao.mapper.som;


import com.kingyun.gpsinspection.purificationservice.facade.model.som.FacadeWorkOrder;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 平板工单mapper
 * Created by yangcs on 2017/2/20.
 */
public interface FacadeWorkOrderMapper {

    /**
     * 同步工单信息
     *
     * @param map
     * @return
     */
    List<FacadeWorkOrder> getOrders(Map map);

    /**
     * 获取工单台帐
     *
     * @param map
     * @return
     */
    List<FacadeWorkOrder> getWeekAndMouth(Map map);

    /**
     * 获取工单台帐总体数
     *
     * @param map
     * @return
     */
    Integer getWeekAndMouthCount(Map map);

    /**
     * 根据工单id查询工单
     *
     * @param workOrderId
     * @return
     */
    FacadeWorkOrder getOrderById(String workOrderId);

    /**
     * 首页工单统计
     *
     * @return
     */
    List<HashMap> getOrder(String orgId);

    /**
     * 未超期未完成的工单总数
     *
     * @param orgId
     * @return
     */
    int getUnFinishOrder(String orgId);

    /**
     * 获取终止任务关联的工单
     *
     * @param map
     * @return
     */
    List<String> getInvalid(Map map);

    /**
     * 下发自定巡检，区别2个版本，为0：存的是步骤id，不为0：存的是标准id和大类
     *
     * @param workOrderId
     * @return
     */
    int getCategoryById(String workOrderId);
}
